package com.xcx.robot.mirai.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
import java.util.List;

/**
 * @Author: 邢晨旭
 * @Date: 2021/5/19 20:35
 * @Description:
 */
@Getter
@Configuration
public class UserConfig {

    @Value("${robot.start.qq}")
    private Long qq;

    @Value("${robot.start.password}")
    private String password;

    @Value("#{'${robot.gm.groups}'.split(',')}")
    private List<Long> gmGroups;

    @Value("#{'${robot.image.groups}'.split(',')}")
    private List<Long> imageGroups;

    @Value("#{'${robot.image.url}'.split(',')}")
    private List<String> imageUrls;

    @Value("#{'${robot.exclude.groups}'.split(',')}")
    private List<Long> excludeList;
    public static List<Long> excludeGroups;


    public static List<Long> ImageGroups;

//    @Value("${robot.error.qq}")
//    private Long errorQq;
//
//    @Value("${robot.error.group}")
//    private Long errorGroup;


    @PostConstruct
    private void initial() {
        excludeGroups = excludeList;
        ImageGroups = imageGroups;
    }


}
